package org.xdq.原型模式;

public class Test {
    public static void main(String[] args) throws IllegalAccessException, InstantiationException, CloneNotSupportedException {

        MyObject obj = new MyObject(20);
        System.out.println(obj);

        for(int i=0;i<5;i++){
            MyObject o = (MyObject) obj.clone();
            o.setId((int)(Math.random()*1000));
            System.out.println(o);
        }





    }
}
